home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / e-tools / plugins / plugin_textimagebutton / tib_test.e < prev    next >
Encoding:
Text File  |  1996-04-11  |  5.5 KB  |  100 lines

  1. MODULE 'tools/easygui', 'tools/plugin_textimagebutton', '*TIB_Images', 'tools/exceptions'
  2.  
  3. PROC main() HANDLE
  4.   DEF tib1=NIL:PTR TO textimagebutton_plugin,
  5.       tib2=NIL:PTR TO textimagebutton_plugin,
  6.       tib3=NIL:PTR TO textimagebutton_plugin,
  7.       tib4=NIL:PTR TO textimagebutton_plugin,
  8.       tib5=NIL:PTR TO textimagebutton_plugin,
  9.       tib6=NIL:PTR TO textimagebutton_plugin,
  10.       tib7=NIL:PTR TO textimagebutton_plugin,
  11.       tib8=NIL:PTR TO textimagebutton_plugin, a
  12.  
  13.   easygui('Plugin Test!',
  14.     [ROWS,
  15.       [TEXT,'EasyGUI PLUGIN Test (Sorry, some images are in MWB-Style!)',NIL,TRUE,15],
  16.       [BAR],
  17.       [ROWS,
  18.         [TEXT,'Simple Image Demonstration (Images have their own borders!):',NIL,FALSE,15],
  19.         [COLS,
  20.           [STR,1,NIL,'To make things look very good try to make gadgets the same y-size like the string gadget has! Next thing to include is to choose wheather you want wide (2 pixels) or narrow (1 pixel) borderwidth.', 300, 5],
  21.           [PLUGIN,{a_left} ,NEW tib1.init( left_high() ,left_low() ,[EPTIB_BORDER,FALSE,NIL])],
  22.           [PLUGIN,{a_right},NEW tib2.init( right_high(),right_low(),[EPTIB_BORDER,FALSE,NIL])],
  23.           [PLUGIN,{a_up}   ,NEW tib3.init( up_high()   ,up_low()   ,[EPTIB_BORDER,FALSE,NIL])],
  24.           [PLUGIN,{a_down} ,NEW tib4.init( down_high() ,down_low() ,[EPTIB_BORDER,FALSE,NIL])]
  25.         ],
  26.         [BAR],
  27.         [TEXT,'EPTIB_IPOSUP and EPTIB_IPOSBOTTOM demonstration:',NIL,FALSE,15],
  28.         [COLS, 
  29.           [PLUGIN,{a_noise},NEW tib5.init( noise_high(),noise_low(),[EPTIB_TEXT,'Does not resize',           EPTIB_IMGPOS,EPTIB_IPOSBOTTOM,EPTIB_RESIZE,EPTIB_RESIZENONE,NIL])],
  30.           [PLUGIN,{a_noise},NEW tib6.init( noise_high(),noise_low(),[EPTIB_TEXT,'Will resize X and Y',EPTIB_IMGPOS,EPTIB_IPOSTOP   ,EPTIB_RESIZE,EPTIB_RESIZEX OR EPTIB_RESIZEY,NIL])]
  31.         ],
  32.         [BAR],
  33.         [TEXT,'Colourful example of this Plugin ! (EPTIB_BGNORMAL and EPTIB_BGSELECTED):',NIL,TRUE,15], 
  34.         [COLS,
  35.           [BUTTON,1,'-->-->-->'],
  36.           [PLUGIN,{a_eye},NEW tib7.init( eye(),NIL,[EPTIB_TEXT,'Baumhaustürzylinderschloßschraubenkopf',EPTIB_BGNORMAL,2,EPTIB_BGSELECTED,3,EPTIB_RESIZE,EPTIB_RESIZEX,NIL])],
  37.           [BUTTON,1,'All Buttons should have same y-size!']
  38.         ],
  39.         [BAR],
  40.         [TEXT, 'Click this imagebutton to get more information about further projects of mine:',NIL,TRUE,5],
  41.         [PLUGIN,{a_about},NEW tib8.init (up_high(),down_low(),[EPTIB_BORDER,FALSE,NIL])]
  42.       ],
  43.       [BAR],
  44.       [SBUTTON,0,'Quit!']
  45.     ])
  46. EXCEPT
  47.   END tib1
  48.   END tib2
  49.   END tib3
  50.   END tib4
  51.   END tib5
  52.   END tib6
  53.   END tib7
  54.   END tib8
  55.   report_exception()
  56. ENDPROC
  57.  
  58. PROC a_left  (info,tib:PTR TO textimagebutton_plugin) IS WriteF('Left-Image pressed !\n')
  59. PROC a_right (info,tib:PTR TO textimagebutton_plugin) IS WriteF('Right-Image pressed !\n')
  60. PROC a_up    (info,tib:PTR TO textimagebutton_plugin) IS WriteF('Up-Image pressed !\n')
  61. PROC a_down  (info,tib:PTR TO textimagebutton_plugin) IS WriteF('Down-Image pressed !\n')
  62. PROC a_eye   (info,tib:PTR TO textimagebutton_plugin) IS WriteF('Eye-Image pressed !\n')
  63. PROC a_noise (info,tib:PTR TO textimagebutton_plugin) IS WriteF('Noise-Image pressed !\n')
  64.  
  65. PROC a_about (info,tib:PTR TO textimagebutton_plugin)
  66. easygui ('Further Information',
  67.   [ROWS,
  68.     [TEXT,'My name is Sebastian Hesselbarth and I started programming   ',NIL,FALSE,5],
  69.     [TEXT,'some nice PLUGINs for the powerful EasyGUI written by        ',NIL,FALSE,5],
  70.     [TEXT,'Wouter van Oortmerssen ! (Many thanx and greez fly to him !) ',NIL,FALSE,5],
  71.     [BAR],
  72.     [TEXT,'Up till now I wrote two PLUGINs :                            ',NIL,FALSE,5],
  73.     [TEXT,' - Plugin_TextImageButton : To implement Imagebuttons and    ',NIL,FALSE,5],
  74.     [TEXT,'     Buttons with Images AND Text in to EasyGUI !            ',NIL,FALSE,5],
  75.     [TEXT,' - Plugin_Bitmap          : To implement a Bitmap - viewer   ',NIL,FALSE,5],
  76.     [TEXT,'     in to your GUI ! Example copies the WB-Bitmap in to the ',NIL,FALSE,5],
  77.     [TEXT,'     viewer !                                                ',NIL,FALSE,5],
  78.     [BAR],
  79.     [TEXT,'Both PLUGINs are yet not really BETA-tested, so contact me 4 ',NIL,FALSE,5],
  80.     [TEXT,'bug report, suggestions, presents, money :), aso. !          ',NIL,FALSE,5],
  81.     [BAR],
  82.     [TEXT,'The following PLUGINs are planned or already in work to make ',NIL,FALSE,5],
  83.     [TEXT,'EasyGUI as powerful as MU! (or as "MU!" as possible :) )  :  ',NIL,FALSE,5],
  84.     [TEXT,' - ListView - PopUp - Gadget : You click on a popupgadget    ',NIL,FALSE,5],
  85.     [TEXT,'     and a ListViewGadget opens under the stringgadget left  ',NIL,FALSE,5],
  86.     [TEXT,'     to the popupgadget ! (look up in some MU! prgs)         ',NIL,FALSE,5],
  87.     [TEXT,' - FileReqester - PopUp - Gadget : Same as above but a ASL   ',NIL,FALSE,5],
  88.     [TEXT,'     or ReqTools-Requester opens !                           ',NIL,FALSE,5],
  89.     [BAR],
  90.     [TEXT,'Right, that''s it ... to contact me (for common projects,too)',NIL,FALSE,5],
  91.     [TEXT,'write to (sorry, no email yet! :( ):                         ',NIL,FALSE,5],
  92.     [TEXT,'     Sebastian Hesselbarth                                   ',NIL,FALSE,5],
  93.     [TEXT,'     Multhoepen 13                                           ',NIL,FALSE,5],
  94.     [TEXT,'     31855 Aerzen                                            ',NIL,FALSE,5],
  95.     [TEXT,'     GERMANY                                                 ',NIL,FALSE,5],
  96.     [TEXT,'     fON : +49-(0)515-480-51 (05154/8051 GERMANY ONLY!)      ',NIL,FALSE,5],
  97.     [BAR],
  98.     [BUTTON,0,'I will contact you !']
  99.   ])
  100. ENDPROC